/*点击不同的价钱出现不同的边框*/
let pricePicture=document.getElementsByClassName("pricePicture");
let borderPicture=document.getElementsByClassName("borderPicture");
/*点击不同的价格支付，在实际支付处显示应支付的价钱*/
/*点击不同的支付价格，显示不同的二维码*/
for(let i=0;i<pricePicture.length;i++){
    pricePicture[i].onclick=function(){
        borderPicture[i].style.display="block";
        for(let j=0;j<pricePicture.length;j++){
            if(j==i){
                continue;
            }
            borderPicture[j].style.display="none";
        }
    }
}
/*vip充值，点击充值天，周，月，年*/
/*点击充值大会员的按钮*/
let differentTimeVip=document.getElementsByClassName("differentTimeVip");
let differentTimeVipBtn=document.getElementsByClassName("differentTimeVipBtn")[0];
// let differentTimeVipBottom=document.getElementsByClassName("differentTimeVipBottom");
let myCoinsNumber=document.getElementsByClassName("myCoinsNumber")[0];
let vipPrice=document.getElementsByClassName("VipPrice");

for(let i=0;i<differentTimeVip.length;i++){
    differentTimeVip[i].onclick=function(){
        /*这里是点击显示边框*/
        differentTimeVip[i].style.border="3px solid #fc1944";
        for(let j=0;j<differentTimeVip.length;j++) {
            if (j == i) {
                continue;
            }
            differentTimeVip[j].style.border="1px solid rgba(0,0,0,.3)";
        }
        /*这里是点击确定按钮是否被禁用*/
        if(Number(vipPrice[i].innerHTML)<=Number(myCoinsNumber.innerHTML)){
            differentTimeVipBtn.style.backgroundColor="";
            differentTimeVipBtn.style.cursor="pointer";
            /*当按钮不被禁用时点击出现提示窗提示一下是否确定充值vip*/
            differentTimeVipBtn.onclick=function(){
                console.log("1");
            }
        }else{
            differentTimeVipBtn.style.cursor="no-drop";
            differentTimeVipBtn.style.backgroundColor="#929599";
            differentTimeVipBtn.onclick=function(){
                console.log();
            }
        }
    }
}


